def show_messages(messages):               # 循环messages列表中的数据
     for message in messages:
        print(message)

def send_messages(messages,snet_messages): # 把message中的数据移动到sent_messages
    while messages:
        current_message = messages.pop()
        sent_messages.append(current_message)


messages = ["How are you","What's your name","Who is her"]
sent_messages =[]
show_messages(messages)

# 8.11
send_messages(messages[:],sent_messages)

# 输出结果
print('The final list:')                   
print(f"messages:{messages}")
print(f"sent_messages:{sent_messages}")